<?php 
require "DataLoad.php"; 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<title><?php echo $GuildName;?> - DKP系统</title>
<script language="JavaScript" src="inc/jquery.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Generator" content="EditPlus">
<meta name="Author" content="SULei">
<meta name="Keywords" content="魔兽世界DKP系统 DKP程序 公会DKP">
<meta name="Description" content="">
<link href="<?php echo $StylePath;?>/main.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="<?php echo $StylePath;?>/styleplus.js"></script>
<script language="JavaScript" src="inc/UBB_UI.js"></script>
<style type="text/css" media="all">

</style>
</head>

<body>
<div class="header">
<?php require "menu.php"; ?>
</div>
<div class="main">
<div class="info">
<h3>公会动态 <?php if (CheckAdmin()) {
	print "<a href='?action=add'>添加</a>";
} ?></h3>
<?php 

$sql="select * from article where article_class='news' order by id desc";
$result = mysql_query($sql);$sql$conn
if ($result->eof || $result->bof) {

//s
}
	else
{

	for ($ig=1; $ig<=8; $ig=$ig+1) {
		print "<div class='".linec($ig)."'>";
		print "<h4>".$result["article_title"].CAbutton($result["id"])."</h4>";
		print "<p>".$UbbCode[($result["article_text"])]."</p>";
		print "</div>";
		$result->movenext;
		if ($result->eof) {
			break;

		} 

	}

} 

$result->close;
?>
</div>
				<ul class="temp_dev">
				<h3>CTRT使用图解</h3>
					<img src="http://www.sulei.net/blog/UploadFile/200633016562747213.jpg" border=0 alt="" />
				</ul>
			</div>
<?php require "footer.php"; ?>
</body>
</html>
<?php 
function Calendar() {
	extract($GLOBALS);

//Const Basedate="2006-1-17"
	$Basedate="2005-1-17";
	$today=time();
	for ($i=0; $i<=6; $i=$i+1) {
		$thisday=$dateadd["d"][$i][$today];
		if (strftime("%w",$thisday)+1==3) {

			$renew=$renew."<img src='images/raid/mc.gif' /><img src='images/raid/bwl.gif' /><img src='images/raid/aq40.gif' />";
		}
			else
		{

			$renew=$renew."<img src='images/raid/none.gif' /><img src='images/raid/none.gif' /><img src='images/raid/none.gif' />";
		} 

		if ($datediff["d"][$Basedate][$thisday]/5==intval($datediff["d"][$Basedate][$thisday]/5)) {

			$renew=$renew."<img src='images/raid/onx.gif' />";
		}
			else
		{

			$renew=$renew."<img src='images/raid/none.gif' />";
		} 

		if ($datediff["d"][$Basedate][$thisday]/3==intval($datediff["d"][$Basedate][$thisday]/3)) {

			$renew=$renew."<img src='images/raid/zg.gif' /><img src='images/raid/aq20.gif' />";
		}
			else
		{

			$renew=$renew."<img src='images/raid/none.gif' /><img src='images/raid/none.gif' />";
		} 


		$tx=$tx."<li>".$day[$thisday].$renew."</li>";
		$renew="";

	}

	print "<div class='calendar'><ul><h3>今天是".time_type(strftime("%m/%d/%Y %H:%M:%S %p"),"11")." ,未来七天的副本更新:</h3>".$tx."</ul></div>";
	return $function_ret;
} 


function newsAddForm() {
	extract($GLOBALS);

	if (${"action"}=="edit") {

		$sql="select top 1 * from article where article_class='news' and id=".${"var"};
		$result = mysql_query($sql);$sql    $conn
		print "<form name='put_log' method='post' action='?action=add2'><input type='text' name='article_title' size='60' value='".$result["article_title"]."' /> <a href='javascript:hyperlink()'>链接</a> <a href='javascript:image()'>图片</a> <a href='javascript:bold()'>加粗</a><br>";
		print "<textarea name='article_text' rows='8' cols='80' name='l_content' id='l_content'>".htmlspecialchars($result["article_text"])."</textarea>";
		print "<input type='hidden' name='article_date' value='".$result["article_date"]."' /><input type='hidden' name='article_id' value='".${"var"}."' /><input type='submit' value='编 辑' /></form>";

		$result->close;
	}
		else
	if (${"action"}=="add") {

		print "<form name='put_log' method='post' action='?action=add2'><input type='text' name='article_title' size='60' value='' /> <a href='javascript:hyperlink()'>链接</a> <a href='javascript:image()'>图片</a> <a href='javascript:bold()'>加粗</a><br>";
		print "<textarea name='article_text' rows='8' cols='80' name='l_content' id='l_content'></textarea>";
		print "<input type='hidden' name='article_id' value='' /><input type='submit' value='编 辑' /></form>";
	} 

	return $function_ret;
} 

//读取计划
function news($id) {
	extract($GLOBALS);

	if (is_numeric($id) && $id!="") {

	}
		else
	{

		$function_ret="";
		return $function_ret;

	} 

	$result = mysql_query($sql);$sql  $conn
	if (!($result->eof || $result->bof)) {

		$function_ret=$result["article_text"];
	} 

	$result->close;
	return $function_ret;
} 

function NewsAddSql() {
	extract($GLOBALS);

	if (${"article_id"}!="" && is_numeric(${"article_id"})) {

		$aid=${"article_id"};
	}
		else
	{

		$aid=0;
	} 

	$sql="select top 1 * from article where article_class='news' and id=".$aid;
	$result = mysql_query($sql);$sql  $conn
	if ($result->eof || $result->bof) {

		$result->addnew;
		$result["article_class"]="news";
		$result["article_title"]=${"article_title"};
		$result["article_text"]=${"article_text"};
		$result["article_date"]=time_type(time(),3);
		$result["article_editor"]=$_SESSION['UserCheck'];
		$result->update;
	}
		else
	{

		$result["article_class"]="news";
		$result["article_title"]=${"article_title"};
		$result["article_text"]=${"article_text"};
		$result["article_date"]=time_type(${"article_date"},3);
		$result["article_editor"]=$_SESSION['UserCheck'];
		$result->update;
	} 

	header("Location: "."default.php");
	return $function_ret;
} 

function NewsdelSql() {
	extract($GLOBALS);

	if (is_numeric(${"var"})) {

		$conn->execute("Delete * from article where id=".${"var"});
	} 

	return $function_ret;
} 

function CAbutton($id) {
	extract($GLOBALS);

	if (CheckAdmin()) {

		$function_ret=" [<a href='default.php?action=edit&amp;var=".$id."'>Edit</a>] [<a href='default.php?action=del&amp;var=".$id."'>X</a>]";
	} 

	return $function_ret;
} 
?>
